<template>
	<!--
    	作者：1550495493@qq.com
    	时间：2019-08-17
    	描述：模板管理
    -->
   <div class="Announcements">
   		<div class="Website-visits">
   			<div class="location">
   				<div class="location-text fl">
   					<img class="location-img fl" src="../../images/BaseManager/moban.png" />
   					<p class="fr">模板管理</p>
   				</div>
   				<img class="biaotibg fl" src="../../images/home/biaotibg.png" />
   			</div>
   			<div class="search-box">
   				<!--<div class="fl">
            <input name="search" class="search" type="text" autocomplete="off" v-model="search" placeholder="搜索模板名称"/>
            <input class="btn" type="button" value="查询" @click="searchTodo" />
   				</div>
          <p>
            注：项目申报指新增项目；项目申请指：专家申请新项目
          </p>
				<div class="fr">
					<input @click="toAdd()" class="btn" type="button" value="添加模板" />
				</div>-->
   			</div>
   			<div class="PressRelease-list">
   				<table>
   					<thead>
   						<tr>
   							<th class="table-text-th1">模板名称</th>
   							<!--<th class="table-text-th1">类型</th>-->
   							<th class="table-text-th1">操作</th>
   						</tr>
   					</thead>
   					<tbody>
   						<tr v-for="template in templateList">
   							<!--<td>{{template.name}} </td>-->
   							<td>{{typeStatus(template.type)}}</td>
   							<td>
                  <input type="button" value="修改" class="delete write" @click="showModelShow(template)" />
                  <!--<input type="button" value="编辑" class="delete write" @click="gotoUpdate(template.uuid)" />-->
                  <!--<input type="button" value="删除" class="delete write" @click="deleteData(template.id)" />-->
                  <input type="button" value="下载" class="delete write" @click="download(template.url)" />
                </td>
   						</tr>
   					</tbody>
   				</table>
   				<!--total  数据总数   size  一页多少条数据   page  当前页码    changge 返回当前选择的页码  改变一页显示条 child  返回值就是一页显示条数  -->
   				<pageination :total="total" :size="size" :page="page" :changge="pageFn" @child="obtainChild"></pageination>
   			</div>
   		</div>

     <!--模态框--修改-->
     <div v-show="ismodelShow" class="tenant-model">
       <div class="tenant-model-content ">
         <header class="tenant-model-header">
           <h3>修改</h3>
           <span @click="closeModel" class="closeModel">×</span>
         </header>
         <div class="tenant-model-body">
           <div class="search-boxs imgbox">
             <input name="id" type="hidden" :value="template.id"/>
             <label>附件：</label>
             <input name="url" type="hidden" :value="template.url"/>
             <input type="file" id="handIdFront" accept=".txt,.rar,.zip,.doc,.docx,.xls,.xlsx,.ppt,.pptx,.pdf,.exe,image/*"
                    @change="idFrontImg($event)" style="display: none;" />
             <input type="button" value="上传模板" class="delete write" @click="touchOffIdInput(1)"/>
             <!--<input type="button" value="删除模板" class="delete write" @click="deleteEnclosure()"/>-->
             <ul class="img-box">
               <li id="urlLi"></li>
             </ul>
           </div>
         </div>
         <footer class="tenant-model-footer">
           <!--<button class="cancel">预览</button>-->
           <button class="determine" @click="updateData()">保存</button>
         </footer>
       </div>
     </div>
   </div>
</template>
<script src="./TemplateManagement.js"></script>

<style scoped>
	@import "TemplateManagement.css";
</style>
